package deployr.domain;

import java.io.*;
import java.util.*;

public class Event implements Serializable, IEvent {

	private static final long serialVersionUID = 8668601491018458433L;

	private final Date date;

	private final String event;

	public Event(final String event, final Date now) {
		this.event = event;
		this.date = notNull(now);
	}

	private Date notNull(final Date date) {
		if (date != null) return date;
		return new Date();
	}

	public Date getCreated() {
		return date;
	}

	public String getName() {
		return event;
	}

}
